Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BD-46] refactor: replaced legacy checkboxes #2555

Merged

Conversation

PKulkoRaccoonGang
Copy link
Contributor

@PKulkoRaccoonGang PKulkoRaccoonGang commented Aug 16, 2023

Description

  • replaced legacy checkboxes inside DataTable and TableFilters components

Deploy Preview

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Does your change adhere to the documented style conventions?
  • Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
  • Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
  • Were your changes tested in the example app?
  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@openedx-webhooks openedx-webhooks added the blended PR is managed through 2U's blended developmnt program label Aug 16, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @PKulkoRaccoonGang!

When this pull request is ready, tag your edX technical lead.

@netlify
Copy link

netlify bot commented Aug 16, 2023

Deploy Preview for paragon-openedx ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8d61d59
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/64df8b59294aad000857b70e
😎 Deploy Preview https://deploy-preview-2555--paragon-openedx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@PKulkoRaccoonGang PKulkoRaccoonGang changed the title [BD-46] refactor: swaped legacy checkboxes inside DataTable, TableFilters com… [BD-46] refactor: swaped legacy checkboxes inside DataTable and TableFilters Aug 16, 2023
@PKulkoRaccoonGang PKulkoRaccoonGang changed the title [BD-46] refactor: swaped legacy checkboxes inside DataTable and TableFilters [BD-46] refactor: replaced legacy checkboxes inside DataTable and TableFilters Aug 16, 2023
@PKulkoRaccoonGang PKulkoRaccoonGang changed the title [BD-46] refactor: replaced legacy checkboxes inside DataTable and TableFilters [BD-46] refactor: replaced legacy checkboxes Aug 16, 2023
@PKulkoRaccoonGang PKulkoRaccoonGang self-assigned this Aug 16, 2023
@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03% 🎉

Comparison is base (40dd412) 91.65% compared to head (8d61d59) 91.69%.
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2555      +/-   ##
==========================================
+ Coverage   91.65%   91.69%   +0.03%     
==========================================
  Files         236      235       -1     
  Lines        4195     4214      +19     
  Branches     1012     1021       +9     
==========================================
+ Hits         3845     3864      +19     
  Misses        346      346              
  Partials        4        4              
Files Changed Coverage Δ
src/DataTable/filters/CheckboxFilter.jsx 100.00% <100.00%> (ø)
...rc/DataTable/filters/MultiSelectDropdownFilter.jsx 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

onChange={() => changeCheckbox(value)}
aria-label={name}
>
{name} {number !== undefined && <Badge className="ml-2" variant="light">{number}</Badge>}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid using CSS utility classes in Paragon components as they include !important, which makes theming/branding difficult for consumers. Consider defining a new .pgn__ namespaced class name or perhaps using <Stack direction="horizontal" gap={2}> here would make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right
I will fix it

return (
<DropdownButton variant="outline-primary" id={ariaLabel.current} title={Header}>
<div role="group" aria-label={Header} className="pgn__dropdown-filter-checkbox-group">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[clarification] Is it intentional to remove the role="group" attribute here?

Copy link
Contributor Author

@PKulkoRaccoonGang PKulkoRaccoonGang Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Form.CheckboxSet have role ="group" by default

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming! 🎉

onChange={() => changeCheckbox(value)}
aria-label={name}
>
{name} {number && <Badge className="ml-2" variant="light">{number}</Badge>}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment as above regarding using CSS utility classes.

@@ -64,7 +64,7 @@ the `arrowUp` and `arrowLeft` keys can be ignored for convenient editing of the
<Form.Control type="password" placeholder="Password" />
</Form.Group>
<Form.Group>
<Form.Check type="checkbox" label="Confirm the entered data" />
<Form.Checkbox>Confirm the entered data</Form.Checkbox>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adamstankiewicz adamstankiewicz merged commit d07827d into openedx:master Sep 1, 2023
9 checks passed
@openedx-webhooks
Copy link

@PKulkoRaccoonGang 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 21.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 22.0.0-alpha.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blended PR is managed through 2U's blended developmnt program raccoon-gang released on @alpha released
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants